package main

import (
	"xin-job/admin/alarm"
	"xin-job/admin/callback"
	"xin-job/admin/logreport"
	"xin-job/admin/registry"
	"xin-job/admin/schedule"
)

func Start() {
	// 维护心跳
	registry.GetInstance().Start()

	// 告警
	alarm.GetInstance().Start()

	// 未回调监控
	callback.GetInstance().Start()

	// 日志收集
	logreport.GetInstance().Start()

	// 调度器启动
	schedule.GetInstance().Start()
}

func Stop() {
	registry.GetInstance().Stop()

	schedule.GetInstance().Stop()

	callback.GetInstance().Stop()

	logreport.GetInstance().Stop()

	alarm.GetInstance().Stop()
}
